DataGridSetCellData

 

The 'DataGridSetCellData' function enter the data to specified cell of DataGrid object.

 

void @DataGridSetCellData(string class_name, int cell_x, int cell_y, string data);

 

Parameters

string class_name : Class name of DataGrid object.

int cell_x : x-coordinate index.

int cell_y : y-coordinate index.

string data : Data to enter.

 

Return Value

None

 

Example 1 (In case of interworking the data at database)

<Assumption>

Class name of DataGrid object which was entered at Studio is 'DataGrid1', and database connection string to interwork is 'Dsn1'. You can interwork the below Access data by using database connection string 'Dsn1'.

 

 

<Contents of the script>

@DataGridSetDsn("DataGrid1", "Dsn1");            // Interworking the new database connection string to DataGrid object

@DataGridClearColumn("DataGrid1");                // Delete all Column of DataGrid object

@DataGridAddTextBoxColumn("DataGrid1", "ID", "ID", "ID");                            // Create the 'ID' Column

@DataGridAddTextBoxColumn("DataGrid1", "NAME", "Field1", "NAME");               // Create the 'NAME' Column
@DataGridAddTextBoxColumn("DataGrid1", "TEL", "Field2", "TEL");             // Create the 'TEL' Column
@DataGridAddTextBoxColumn("DataGrid1", "ADDRESS", "Field3", "ADDRESS");          // Create the 'ADDRESS' Column

@DataGridSetSelect("DataGrid1", "SELECT * FROM Table1");                             // Set the data to each Column
@DataGridReLoad("DataGrid1");                        // Reload the DataGrid object


<LocalMain program screen>

 

Example 2 (In case of not interworking the data at database)

<Assumption>

Class name of DataGrid object which was entered at Studio is 'DataGrid1', and data is created by script.

 

<Contents of the script>

@DataGridSetDsn("DataGrid1", "");     // Release the database connection string which was interworked with DataGrid object
@DataGridClearColumn("DataGrid1");     // Delete all Column of DataGrid object
@DataGridAddTextBoxColumn("DataGrid1", "ID", "ID", "ID");     // Create the 'ID' Column
@DataGridAddTextBoxColumn("DataGrid1", "NAME", "NAME", "");     //Create the 'NAME' Column
@DataGridAddTextBoxColumn("DataGrid1", "TEL", "TEL", "");     // Create the 'TEL' Column
@DataGridAddTextBoxColumn("DataGrid1", "ADDRESS", "ADDRESS", "");     // Create the 'ADDRESS' Column
index = @DataGridAddRow("DataGrid1");     // Create the row
@DataGridSetCellData("DataGrid1", 0, index, "1");     // Enter the data to specified cell
@DataGridSetCellData("DataGrid1", 1, index, "Lee Byunggyu");     // Enter the data to specified cell
@DataGridSetCellData("DataGrid1", 2, index, "111-1111");     //Enter the data to specified cell
@DataGridSetCellData("DataGrid1", 3, index, "SEOUL");     // Enter the data to specified cell
@DataGridReLoad("DataGrid1");     // Reload the DataGrid object

 

<LocalMain program screen>

 

Version Information

Supported Version : 10.2.4 or higher